package com.lingyuan.oms.handler;

import com.lingyuan.oms.domain.param.CreateOrderParam;

/**
 * @ClassName：AbstracHandler
 * @Author: LeiHao
 * @Date: 2024/10/8 10:25
 * @Description: 链接责任链
 */
public abstract class AbstractHandler implements Handler {
    private Handler next;

    public void setNext(Handler next) {
        this.next = next;
    }

    @Override
    public boolean handle(CreateOrderParam param) {
        if (next != null) {
            return next.handle(param);
        }
        return true;
    }
}
